package main

import (
	"flag"
	"github.com/gogf/gf/v2/os/gctx"
	"github.com/gogf/gf/v2/os/glog"
	"rewords-server-2024/internal/cmd"
	"rewords-server-2024/internal/global"
	_ "rewords-server-2024/internal/packed"

	_ "rewords-server-2024/internal/logic"
)

func main() {
	//cmd.Main.Run(gctx.GetInitCtx())
	var ctx = gctx.GetInitCtx()
	// 初始化一些信息
	global.Init(ctx)

	//---
	var apiport int
	flag.IntVar(&apiport, "port", 9003, "端口号，默认为9003")
	flag.Parse()
	//---
	glog.Print(ctx, "apiport:", apiport)

	cmd.Main.Run(ctx)
}
